package com.yuedao.sender.model1;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * AssistDemo
 * com.chris.demo.model.orm
 * Created by Chris Chen
 * 2018/1/5
 * Explain:
 */
@Entity(name = "ydx_receipts")
public class ReceiptEntity {
    private int id;
    private Integer receiptType;
    private String title;
    private String identityNo;
    private String cell;
    private String email;
    private String description;

    //跌代追加
    private Integer isPrint;
    private BigDecimal amount;
    private String name;
    private String address;
    private Integer isSend;
    private Timestamp requestGmt;
    private Timestamp sendGmt;



    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "receipt_type", nullable = true)
    public Integer getReceiptType() {
        return receiptType;
    }

    public void setReceiptType(Integer receiptType) {
        this.receiptType = receiptType;
    }

    @Basic
    @Column(name = "title", nullable = false, length = 1024)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "identity_no", nullable = false, length = 128)
    public String getIdentityNo() {
        return identityNo;
    }

    public void setIdentityNo(String identityNo) {
        this.identityNo = identityNo;
    }

    @Basic
    @Column(name = "cell", nullable = true, length = 32)
    public String getCell() {
        return cell;
    }

    public void setCell(String cell) {
        this.cell = cell;
    }

    @Basic
    @Column(name = "email", nullable = true, length = 128)
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "description", nullable = true, length = 2048)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }


    public Integer getIsPrint() {
        return isPrint;
    }

    public void setIsPrint(Integer isPrint) {
        this.isPrint = isPrint;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getIsSend() {
        return isSend;
    }

    public void setIsSend(Integer isSend) {
        this.isSend = isSend;
    }

    public Timestamp getRequestGmt() {
        return requestGmt;
    }

    public void setRequestGmt(Timestamp requestGmt) {
        this.requestGmt = requestGmt;
    }

    public Timestamp getSendGmt() {
        return sendGmt;
    }

    public void setSendGmt(Timestamp sendGmt) {
        this.sendGmt = sendGmt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ReceiptEntity that = (ReceiptEntity) o;

        if (id != that.id) return false;
        if (receiptType != null ? !receiptType.equals(that.receiptType) : that.receiptType != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (identityNo != null ? !identityNo.equals(that.identityNo) : that.identityNo != null) return false;
        if (cell != null ? !cell.equals(that.cell) : that.cell != null) return false;
        if (email != null ? !email.equals(that.email) : that.email != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (receiptType != null ? receiptType.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (identityNo != null ? identityNo.hashCode() : 0);
        result = 31 * result + (cell != null ? cell.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        return result;
    }
}
